Let’s load the pidiq2 package.
#Installing Dependencies:
#PIDIQ2 requires the magick and EBImage packages:
#1) Magick:
#If using linux, will have to install magick++ linux-os libraries:
#Open a terminal and input the following command: sudo apt-get install libmagick++-dev
#Next, install the R-magick library:
install.packages('magick')
#2) EBImage:
#Use the remotes package to install_github():
install.packages(remotes)
remotes::install_github('aoles/EBImage')
####
#Install PIDIQ2 from https://github.com/cedatorma/pidiq2:
remotes::install_github("cedatorma/pidiq2")
#And lastly, load the PIDIQ2 package:
library(pidiq2)
Get paths to images from the ./photos/ directory:
img_dir <- './photos/'
img_paths <- paste0(img_dir, list.files(img_dir))
img_paths
## [1] "./photos/DSC_0788.JPG" "./photos/DSC_0788.JPG_cropped.jpg"
## [3] "./photos/DSC_0789.JPG" "./photos/DSC_0789.JPG_cropped.jpg"
## [5] "./photos/DSC_0790.JPG" "./photos/DSC_0790.JPG_cropped.jpg"
## [7] "./photos/DSC_0791.JPG" "./photos/DSC_0791.JPG_cropped.jpg"
## [9] "./photos/DSC_0792.JPG" "./photos/DSC_0792.JPG_cropped.jpg"
## [11] "./photos/DSC_0793.JPG" "./photos/DSC_0793.JPG_cropped.jpg"
## [13] "./photos/DSC_0794.JPG" "./photos/DSC_0794.JPG_cropped.jpg"
## [15] "./photos/DSC_0795.JPG" "./photos/DSC_0795.JPG_cropped.jpg"
Let’s choose the first image to work with:
./photos/DSC_0788.JPG